import request from '@/utils/request_zc'

export function getMaterialInventoryList ({
  page,
  limit,
  materialName,
  materialModel,
  materialSpecification
}) {
  return request({
    url: '/material/inventory/list',
    method: 'get',
    params: {
      page,
      limit,
      materialName,
      materialModel,
      materialSpecification
    }
  })
}

export function getMarehouseList () {
  return request({
    url: '/warehouse/list',
    method: 'get',
  })
}

export function editInventory ({
  id,
  warehouseId,
  materialId,
  upperLimit,
  lowerLimit,
  detailList
}) {
  return request({
    url: '/material/inventory/edit',
    method: 'post',
    data: {
      id,
      warehouseId,
      materialId,
      upperLimit,
      lowerLimit,
      detailList
    }
  })
}

export function delInventory ({
  ids,
}) {
  return request({
    url: '/material/inventory/del',
    method: 'post',
    data: {
      ids
    }
  })
}




